package hotel.switchs.oversea.biz.controller.order;

import hotel.base.oversea.utils.Result;
import hotel.switchs.oversea.api.VO.request.OrderInfoVo;
import hotel.switchs.oversea.biz.service.SwitchOrderInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: limingfa
 * @Date: 2020/09/25/11:00
 * @Description: 后台接口专用
 */
@Slf4j
@Api(value = "SwitchOrderController",tags = {"后台订单控制器"})
@RestController
@RequestMapping("/switchOrder")
public class SwitchOrderController {
    @Autowired
    private SwitchOrderInfoService switchOrderInfoService;
    /***
    * @Author: lmf
    * @Date: 2020/9/25
     * 订单接单时长统计
    */
    @PostMapping("/getOrderList")
    @ApiOperation(value = "订单变化通知接口",notes="必须经过auth授权")
    public Result<Object> getdltordernotify(@RequestBody OrderInfoVo orderInfoVo){
        return switchOrderInfoService.getOrderList(orderInfoVo);
    }
    /***
    * @Author: lmf
    * @Date: 2020/9/27
     * 查看酒店订单列表
    */
    @PostMapping("/orderHotelList")
    @ApiOperation(value = "订单变化通知接口",notes="必须经过auth授权")
    public Result<Object> orderHotelList(@RequestBody OrderInfoVo orderInfoVo){
        return switchOrderInfoService.orderHotelList(orderInfoVo);

    }
}
